import React,{ Component } from 'react';
import { createPortal } from 'react-dom'

function widthPotal(WrappedComponent) {
    return class extends Component{
        render(){
            return createPortal(
                <WrappedComponent {...this.props}></WrappedComponent>,   
                document.querySelector('body')
            )
        }
    }

}

export default widthPotal;
